import java.net.MalformedURLException;

public class Url
{
    public static void main (String[] args) throws MalformedURLException
    {
//        //创建URL对象
//        URL url = new URL("https://www.bytedance.com/zh/");
//
//        System.out.println("获取与此URL协议相关的默认端口：" + url.getDefaultPort());
//        System.out.println("获取访问资源：" + url.getFile());
//        System.out.println("主机名：" + url.getHost());
//        System.out.println("资源访问路径：" + url.getPath());
//        System.out.println("协议:" + url.getProtocol());
//        System.out.println("参数部分" + url.getQuery());
    
        //big胆，敢爬bytedance
//        URL url = new URL("https://jobs.bytedance.com/experienced/position/7446247222951987464/detail");
//
//        try(BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(url.openStream())))
//        {
//            StringBuilder stringBuilder = new StringBuilder();
//            String temp = "";
//
//            while((temp = bufferedReader.readLine()) != null)
//            {
//                stringBuilder.append(temp);
//            }
//
//            System.out.println(stringBuilder);
//        }
//        catch(IOException e)
//        {
//            e.printStackTrace();
//        }
    }
}
